home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 July / Ahoy_Magazine_87-07_1987_Double_L_Side_A.d64 / Binary Power 3 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  35 lines

  1. 0 rem << cd43-7 >>
  2. 1 rem ==================================
  3. 2 rem  commodares problem #39-3 :
  4. 3 print"[147]    [194]inary [208]ower 3"
  5. 4 rem  solution by
  6. 5 rem     russell k prater
  7. 6 rem  screen character reversal
  8. 8 rem =====  c-64 only  ================
  9. 9 rem  select address for character ram
  10. 10 addr=12288 : poke 252,addr/256
  11. 19 rem   protect it from basic
  12. 20 poke 56,addr/256 : clr
  13. 29 rem   code is relocatable; change ml
  14. 30 ml=820 : if peek(ml)<>169 then gosub 110
  15. 39 rem   download and reverse rom
  16. 40 sys ml : p=peek(53272)
  17. 49 rem   redirect vic chip
  18. 50 poke 53272,(p and 240)+12
  19. 59 rem   press any key to restore
  20. 60 get a$ : if a$="" then 60
  21. 70 poke 53272,p
  22. 79 rem    press any key to reverse
  23. 80 get a$ : if a$="" then 80
  24. 90 goto 50
  25. 100 end
  26. 110 for i=ml to ml+55:read a:ck=ck+a:poke i,a:next:if ck=7701 then return
  27. 120 print"error in data":end
  28. 130 data 169,(NULL)15,133,255,169,000,133,251
  29. 140 data 133,253,169,208,133,254,120,165
  30. 150 data 001,041,251,133,001,16(NULL),000,177
  31. 160 data 253,162,007,010,102,002,202,016
  32. 170 data 250,165,002,145,251,200,208,239
  33. 180 data 230,252,230,254,198,255,016,231
  34. 190 data 165,001,009,004,133,001,088,096
  35.